package com.yfp.minapp.auth.api.domain;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yfp.common.core.text.BigDecimalSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @Description: 投放计划
 *
 * @CreateDate: 2024/6/27 16:27
 * @UpdateUser:
 * @UpdateDate: 2024/6/27 16:27
 * @UpdateRemark: 暂无修改
 * @Version: 1.0
 */
@Data
public class ReplenishDTO implements Serializable {
    private String comboName;
    private String thumbUrl;
    private Integer expireDay;
    private Integer heatTime;
    private Marketing marketing;
    private String comboId;
    private Integer roadNumber;
    private Integer comboNum;
    private List<GoodsData> goodsData;
    private List<ComboLabel> comboLabel;
    private Tastes tastes;
    private ComboDetailData comboDetailData;

    @Data
    public static class Marketing implements Serializable {
        private Double applietAmount;
        private Double deviceAmount;
        private Double vipAmount;

        /**
         * 优惠后的价格66
         */
        @Schema(description = "优惠后的价格")
        @JsonSerialize(using = BigDecimalSerializer.class)
        private BigDecimal discountedAfterPrice;

        /**
         * 优惠券id
         */
        @Schema(description = "优惠券id")
        private Long clientCouponId;
    }

    @Data
    public static class GoodsData implements Serializable {
        private String goodsNutritive;
        private Double value;
    }

    @Data
    public static class ComboLabel implements Serializable {
        private String labelName;
        private Integer level;
        private String color;
    }

    @Data
    public static class Tastes implements Serializable {
        private Integer spicy;
    }

    @Data
    public static class Resource implements Serializable {
        private String resourceType;
        private String resourceUrl;
    }

    @Data
    public static class ComboDetailData implements Serializable {
        private List<Resource> resourceList;

    }
}